#include<iostream>
using namespace std;
typedef long long LL;
const int N = 15;
LL a[N];
LL n;

int main()
{
	cin >> n;
	int ans = 0;
	while (n) {
		if (n % 2 == 0)ans++;
		n /= 2;
	}
	cout << ans << endl;
	return 0;
}